home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 2000 November: Tool Chest / Dev.CD Nov 00 TC Disk 1.toast / What's New? / Development Kits / Mac OS / USB DDK 1.4.6f4 / Interfaces / SerialShim.h < prev    next >
Encoding:
C/C++ Source or Header  |  2000-09-25  |  1.7 KB  |  84 lines  |  [TEXT/MPS ]

  1. /*
  2.     File:        SerialShim.h
  3.  
  4.     Contains:    xxx put contents here xxx
  5.  
  6.     Version:    xxx put version here xxx
  7.  
  8.     Copyright:    © 1998, 2000 by Apple Computer, Inc., all rights reserved.
  9.  
  10. */
  11.  
  12. #ifndef    _SERIALSHIM_
  13. #define    _SERIALSHIM_
  14.  
  15. // Shim definitions etc.
  16.  
  17. typedef UInt32    ShimRefNum;
  18. typedef UInt32    *IconPtr;
  19.  
  20. #define kInvalidRef        -1
  21.  
  22. #define Serial_Shim                "\pSerialShimLib"
  23.  
  24. #define Shim_SerialInstall        "\pSerialShimInstallDriver"
  25. #define Shim_SerialRemove        "\pSerialShimRemoveDriver"
  26. #define    Shim_SerialIOComplete    "\pSerialShimIOComplete"
  27. #define Shim_SerialDriverName    "\pSerialShimDriverName"
  28. #define Shim_SerialSetFlags        "\pSerialShimSetFlags"
  29. #define Shim_SerialGetGlobals    "\pSerialShimGetGlobals"
  30.  
  31. #define Serial_HAL                "\pSerHAL_Entry"                // Must be the name of the entry point in the driver
  32.  
  33. // Shim interface structure
  34.  
  35. typedef    struct    SerialShimInterface
  36. {
  37.     StringPtr            DRVRInName;
  38.     StringPtr            DRVROutName;
  39.     StringPtr             CRMName;
  40.     IconPtr             CRMIcon;
  41.     UInt32                MaxSpeed;
  42.     UInt32                RefCon;
  43.     CFragConnectionID    ConnID;
  44.     
  45. } SerialShimInterface;
  46.  
  47. // Flags
  48.  
  49. enum
  50. {
  51.     Internal_USB        =    0x0001,
  52.     Set_Globals            =    0x0002
  53. };
  54.  
  55. // Hardware abstaction codes
  56.  
  57. enum
  58. {
  59.     SerHAL_Initialize        =    0,
  60.     SerHAL_Terminate        =    1,
  61.     SerHAL_Read                =    2,
  62.     SerHAL_Write            =    3,
  63.     SerHAL_SetConfiguration    =    4,
  64.     SerHAL_SetInputBuffer    =    5,
  65.     SerHAL_SetFlowControl    =    6,
  66.     SerHAL_SetBreak            =    7,
  67.     SerHAL_SetDTERate        =    8,
  68.     SerHAL_SetDTR            =    9,
  69.     SerHAL_SetParity        =    10,
  70.     SerHAL_SetXOffFlag        =    11,
  71.     SerHAL_SendXOn            =    12,
  72.     SerHAL_SendXOff            =    13,
  73.     SerHAL_Miscellaneous    =    14,
  74.     SerHAL_GetBuffer        =    15,
  75.     SerHAL_GetStatus        =    16,
  76.     SerHAL_GetVersion        =    17,
  77.     SerHAL_ControlExtend    =    18,
  78.     SerHAL_StatusExtend        =    19,
  79.     SerHAL_KillRead            =    20,
  80.     SerHAL_KillWrite        =     21
  81. };
  82.  
  83. #endif
  84.